{extend name="../../base/view/layout" /}
{block name="my_body"}
<div class="maincontent">
    <div class="maincontentinner">

        <form  enctype="multipart/form-data" method="post" action="<?php echo url('shop/Goodsattr/add',['id'=>$goods_id]);?>">
            <table  class="table table-bordered">
                <thead>
                <tr>
                    <?php
                 $count=0;
                 foreach($data as $k=>$v):
                    $count++;
                    ?>
                    <th  ><?php echo $k;?></th>
                    <?php endforeach;?>
                    <th  >库存</th>
                    <th  >商品价格</th>
                    <th  >促销价格</th>
                    <th  >会员价格</th>
                    <th  >商品重量</th>
                    <th  >商品图片</th>
                </tr>
                </thead>
                <!--start-->
                <tbody>
                <tr>
                    <?php foreach($data as $k=>$v):?>
                    <td >
                        <select name="goods_attr_id[]" style="width:110px;">
                            <option value=''>-请选择-</option>
                            <?php foreach($v as $k1=>$v1):?>
                            <option value="<?php echo $v1['id'];?>"><?php echo $v1['attr_value'];?></option>
                            <?php endforeach;?>
                        </select>
                    </td>
                    <?php endforeach;?>
                    <input type="hidden" name="goods_id" value="<?php echo $goods_id;?>" />
                    <td ><input type="text" name="goods_number" value="0"/></td>
                    <td ><input type="text" name="goods_price" value="0.0000"  /></td>
                    <td ><input type="text" name="promote_price" value="0.0000" /></td>
                    <td ><input type="text" name="member_price" value="0.0000"  /></td>
                    <td ><input type="text" name="goods_weight" value="0.00"  />&ensp;kg</td>
                    <td ><input type="file" name="goods_pic"  /></td>
                </tr>
                <!--end-->
                </tbody>
                <tbody>
                <tr>
                    <td colspan="<?php echo $count+6;?>" align="right"><input type='submit' value='提交' style="background:#46b8da;padding:5px 10px;color:#fff;margin-right:150px;border:0px;"/></td>
                </tr>
                </tbody>
            </table>
        </form>


    </div><!--maincontentinner-->
</div><!--maincontent-->
{/block}

{block name="my_js"}

{/block}
